<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>预定义常量</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="sqlsrv.resources.html">资源类型</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="ref.sqlsrv.html">SQLSRV 函数</a></div>
 <div class="up"><a href="book.sqlsrv.html">SQLSRV</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="sqlsrv.constants" class="appendix">
 <h1>预定义常量</h1>

 <p class="simpara">下列常量由此扩展定义，且仅在此扩展编译入 PHP 或在运行时动态载入时可用。</p>
 <p class="para">
  <dl>

   
    <dt id="constant.sqlsrv-fetch-assoc">
     <strong><code>SQLSRV_FETCH_ASSOC</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Forces <span class="function"><a href="function.sqlsrv-fetch-array.html" class="function">sqlsrv_fetch_array()</a></span> to return an associative 
     array when passed as a parameter. 
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-fetch-numeric">
     <strong><code>SQLSRV_FETCH_NUMERIC</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Forces <span class="function"><a href="function.sqlsrv-fetch-array.html" class="function">sqlsrv_fetch_array()</a></span> to return an array with 
     numeric when passed as a parameter. 
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-fetch-both">
     <strong><code>SQLSRV_FETCH_BOTH</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Forces <span class="function"><a href="function.sqlsrv-fetch-array.html" class="function">sqlsrv_fetch_array()</a></span> to return an array with both 
     associative and numeric keys when passed as a parameter (the default behavior). 
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-err-all">
     <strong><code>SQLSRV_ERR_ALL</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Forces <span class="function"><a href="function.sqlsrv-errors.html" class="function">sqlsrv_errors()</a></span> to return both errors and warings 
     when passed as a parameter (the default behavior). 
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-err-errors">
     <strong><code>SQLSRV_ERR_ERRORS</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Forces <span class="function"><a href="function.sqlsrv-errors.html" class="function">sqlsrv_errors()</a></span> to return errors only (no warnings) 
     when passed as a parameter. 
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-err-warnings">
     <strong><code>SQLSRV_ERR_WARNINGS</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Forces <span class="function"><a href="function.sqlsrv-errors.html" class="function">sqlsrv_errors()</a></span> to return warnings only (no errors) 
     when passed as a parameter. 
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-log-system-all">
     <strong><code>SQLSRV_LOG_SYSTEM_ALL</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Turns on logging of all subsystems when passed to 
     <span class="function"><a href="function.sqlsrv-configure.html" class="function">sqlsrv_configure()</a></span> as a parameter. 
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-log-system-conn">
     <strong><code>SQLSRV_LOG_SYSTEM_CONN</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Turns on logging of connection activity when passed to 
     <span class="function"><a href="function.sqlsrv-configure.html" class="function">sqlsrv_configure()</a></span> as a parameter. 
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-log-system-init">
     <strong><code>SQLSRV_LOG_SYSTEM_INIT</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Turns on logging of initialization activity when passed to 
     <span class="function"><a href="function.sqlsrv-configure.html" class="function">sqlsrv_configure()</a></span> as a parameter. 
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-log-system-off">
     <strong><code>SQLSRV_LOG_SYSTEM_OFF</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Turns off logging of all subsystems when passed to 
     <span class="function"><a href="function.sqlsrv-configure.html" class="function">sqlsrv_configure()</a></span> as a parameter. 
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-log-system-stmt">
     <strong><code>SQLSRV_LOG_SYSTEM_STMT</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Turns on logging of statement activity when passed to 
     <span class="function"><a href="function.sqlsrv-configure.html" class="function">sqlsrv_configure()</a></span> as a parameter. 
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-log-system-util">
     <strong><code>SQLSRV_LOG_SYSTEM_UTIL</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Turns on logging of error function activity when passed to 
     <span class="function"><a href="function.sqlsrv-configure.html" class="function">sqlsrv_configure()</a></span> as a parameter. 
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-log-severity-all">
     <strong><code>SQLSRV_LOG_SEVERITY_ALL</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Specifies that errors, warnings, and notices will be logged 
     when passed to <span class="function"><a href="function.sqlsrv-configure.html" class="function">sqlsrv_configure()</a></span> as a parameter. 
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-log-severity-error">
     <strong><code>SQLSRV_LOG_SEVERITY_ERROR</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Specifies that errors will be logged when passed to 
     <span class="function"><a href="function.sqlsrv-configure.html" class="function">sqlsrv_configure()</a></span> as a parameter. 
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-log-severity-notice">
     <strong><code>SQLSRV_LOG_SEVERITY_NOTICE</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Specifies that notices will be logged when passed to 
     <span class="function"><a href="function.sqlsrv-configure.html" class="function">sqlsrv_configure()</a></span> as a parameter. 
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-log-severity-warning">
     <strong><code>SQLSRV_LOG_SEVERITY_WARNING</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Specifies that warnings will be logged when passed to 
     <span class="function"><a href="function.sqlsrv-configure.html" class="function">sqlsrv_configure()</a></span> as a parameter. 
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-nullable-yes">
     <strong><code>SQLSRV_NULLABLE_YES</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Indicates that a column is nullable.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-nullable-no">
     <strong><code>SQLSRV_NULLABLE_NO</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Indicates that a column is not nullable.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-nullable-unknown">
     <strong><code>SQLSRV_NULLABLE_UNKNOWN</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Indicates that it is not known if a column is nullable.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-param-in">
     <strong><code>SQLSRV_PARAM_IN</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Indicates an input parameter when passed to <span class="function"><a href="function.sqlsrv-query.html" class="function">sqlsrv_query()</a></span> 
     or <span class="function"><a href="function.sqlsrv-prepare.html" class="function">sqlsrv_prepare()</a></span>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-param-inout">
     <strong><code>SQLSRV_PARAM_INOUT</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Indicates a bidirectional parameter when passed to <span class="function"><a href="function.sqlsrv-query.html" class="function">sqlsrv_query()</a></span> 
     or <span class="function"><a href="function.sqlsrv-prepare.html" class="function">sqlsrv_prepare()</a></span>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-param-out">
     <strong><code>SQLSRV_PARAM_OUT</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Indicates an output parameter when passed to <span class="function"><a href="function.sqlsrv-query.html" class="function">sqlsrv_query()</a></span> or 
     <span class="function"><a href="function.sqlsrv-prepare.html" class="function">sqlsrv_prepare()</a></span>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-phptype-int">
     <strong><code>SQLSRV_PHPTYPE_INT</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Specifies an integer PHP data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc296208.aspx" class="link external">&raquo;&nbsp;How to: Specify PHP Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-phptype-datetime">
     <strong><code>SQLSRV_PHPTYPE_DATETIME</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Specifies a datetime PHP data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc296208.aspx" class="link external">&raquo;&nbsp;How to: Specify PHP Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-phptype-float">
     <strong><code>SQLSRV_PHPTYPE_FLOAT</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Specifies a float PHP data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc296208.aspx" class="link external">&raquo;&nbsp;How to: Specify PHP Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-phptype-stream">
     <strong><code>SQLSRV_PHPTYPE_STREAM</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Specifies a PHP stream. This constant works like a function and accepts an 
     encoding constant. See the SQLSRV_ENC_* constants. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc296208.aspx" class="link external">&raquo;&nbsp;How to: Specify PHP Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-phptype-string">
     <strong><code>SQLSRV_PHPTYPE_STRING</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Specifies a string PHP data type. This constant works like a function and 
     accepts an encoding constant. See the SQLSRV_ENC_* constants. For usage information, 
     see <a href="http://msdn.microsoft.com/en-us/library/cc296208.aspx" class="link external">&raquo;&nbsp;How to: Specify PHP Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-enc-binary">
     <strong><code>SQLSRV_ENC_BINARY</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Specifies that data is returned as a raw byte stream from the server without 
     performing encoding or translation. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc296208.aspx" class="link external">&raquo;&nbsp;How to: Specify PHP Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-enc-char">
     <strong><code>SQLSRV_ENC_CHAR</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Data is returned in 8-bit characters as specified in the code page of the 
     Windows locale that is set on the system. Any multi-byte characters or characters 
     that do not map into this code page are substituted with a single byte question 
     mark (?) character. This is the default encoding. For usage information, 
     see <a href="http://msdn.microsoft.com/en-us/library/cc296208.aspx" class="link external">&raquo;&nbsp;How to: Specify PHP Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.utf-8">
     <strong><code>UTF-8</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Specifies that data is returned with UTF-8 encoding. For usage information, 
     see <a href="http://msdn.microsoft.com/en-us/library/cc296208.aspx" class="link external">&raquo;&nbsp;How to: Specify PHP Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-bigint">
     <strong><code>SQLSRV_SQLTYPE_BIGINT</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the bigint SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-binary">
     <strong><code>SQLSRV_SQLTYPE_BINARY</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the binary SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-bit">
     <strong><code>SQLSRV_SQLTYPE_BIT</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the bit SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-char">
     <strong><code>SQLSRV_SQLTYPE_CHAR</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the char SQL Server data type. This constant works like a function 
     and accepts a parameter indicating the number characters. For usage information, 
     see <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-date">
     <strong><code>SQLSRV_SQLTYPE_DATE</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the date SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-datetime">
     <strong><code>SQLSRV_SQLTYPE_DATETIME</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the datetime SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-datetime2">
     <strong><code>SQLSRV_SQLTYPE_DATETIME2</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the datetime2 SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-datetimeoffset">
     <strong><code>SQLSRV_SQLTYPE_DATETIMEOFFSET</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the datetimeoffset SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-decimal">
     <strong><code>SQLSRV_SQLTYPE_DECIMAL</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the decimal SQL Server data type. This constant works like a function 
     and accepts two parameters indicating (in order) precision and scale. For usage information, 
     see <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-float">
     <strong><code>SQLSRV_SQLTYPE_FLOAT</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the float SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-image">
     <strong><code>SQLSRV_SQLTYPE_IMAGE</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the image SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-int">
     <strong><code>SQLSRV_SQLTYPE_INT</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the int SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-money">
     <strong><code>SQLSRV_SQLTYPE_MONEY</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the money SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-nchar">
     <strong><code>SQLSRV_SQLTYPE_NCHAR</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the nchar SQL Server data type. This constant works like a function 
     and accepts a single parameter indicating the character count. For usage information, 
     see <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-numeric">
     <strong><code>SQLSRV_SQLTYPE_NUMERIC</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the numeric SQL Server data type. This constant works like a function 
     and accepts two parameter indicating (in order) precision and scale. For usage 
     information, see <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-nvarchar">
     <strong><code>SQLSRV_SQLTYPE_NVARCHAR</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the nvarchar SQL Server data type. This constant works like a function 
     and accepts a single parameter indicating the character count. For usage 
     information, see <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt>

     <strong><code>SQLSRV_SQLTYPE_NVARCHAR</code></strong>(&#039;max&#039;)
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the nvarchar(MAX) SQL Server data type. For usage information, 
     see <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-ntext">
     <strong><code>SQLSRV_SQLTYPE_NTEXT</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the ntext SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-real">
     <strong><code>SQLSRV_SQLTYPE_REAL</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the real SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-smalldatetime">
     <strong><code>SQLSRV_SQLTYPE_SMALLDATETIME</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the smalldatetime SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-smallint">
     <strong><code>SQLSRV_SQLTYPE_SMALLINT</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the smallint SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-smallmoney">
     <strong><code>SQLSRV_SQLTYPE_SMALLMONEY</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the smallmoney SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-text">
     <strong><code>SQLSRV_SQLTYPE_TEXT</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the text SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-time">
     <strong><code>SQLSRV_SQLTYPE_TIME</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the time SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-timestamp">
     <strong><code>SQLSRV_SQLTYPE_TIMESTAMP</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the timestamp SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-tinyint">
     <strong><code>SQLSRV_SQLTYPE_TINYINT</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the tinyint SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-uniqueidentifier">
     <strong><code>SQLSRV_SQLTYPE_UNIQUEIDENTIFIER</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the uniqueidentifier SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-udt">
     <strong><code>SQLSRV_SQLTYPE_UDT</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the UDT SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-varbinary">
     <strong><code>SQLSRV_SQLTYPE_VARBINARY</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the varbinary SQL Server data type. This constant works like a function 
     and accepts a single parameter indicating the byte count. For usage information, 
     see <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt>

     <strong><code>SQLSRV_SQLTYPE_VARBINARY</code></strong>(&#039;max&#039;)
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the varbinary(MAX) SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-varchar">
     <strong><code>SQLSRV_SQLTYPE_VARCHAR</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the varchar SQL Server data type. This constant works like a function 
     and accepts a single parameter indicating the character count. For usage information, 
     see <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt>

     <strong><code>SQLSRV_SQLTYPE_VARCHAR</code></strong>(&#039;max&#039;)
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the varchar(MAX) SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-sqltype-xml">
     <strong><code>SQLSRV_SQLTYPE_XML</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Describes the XML SQL Server data type. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/cc626305.aspx" class="link external">&raquo;&nbsp;How to: Specify SQL Types</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-txn-read-uncommitted">
     <strong><code>SQLSRV_TXN_READ_UNCOMMITTED</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Inidicates a transaction isolation level of READ UNCOMMITTED. This value is 
     used to set the TransactionIsolation level in the $connectionOptions arrary 
     passed to <span class="function"><a href="function.sqlsrv-connect.html" class="function">sqlsrv_connect()</a></span>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-txn-read-committed">
     <strong><code>SQLSRV_TXN_READ_COMMITTED</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Inidicates a transaction isolation level of READ COMMITTED. This value is 
     used to set the TransactionIsolation level in the $connectionOptions arrary 
     passed to <span class="function"><a href="function.sqlsrv-connect.html" class="function">sqlsrv_connect()</a></span>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-txn-repeatable-read">
     <strong><code>SQLSRV_TXN_REPEATABLE_READ</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Inidicates a transaction isolation level of REPEATABLE READ. This value is 
     used to set the TransactionIsolation level in the $connectionOptions arrary 
     passed to <span class="function"><a href="function.sqlsrv-connect.html" class="function">sqlsrv_connect()</a></span>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-txn-snapshot">
     <strong><code>SQLSRV_TXN_SNAPSHOT</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Inidicates a transaction isolation level of SNAPSHOT. This value is used to 
     set the TransactionIsolation level in the $connectionOptions arrary passed 
     to <span class="function"><a href="function.sqlsrv-connect.html" class="function">sqlsrv_connect()</a></span>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-txn-read-serializable">
     <strong><code>SQLSRV_TXN_READ_SERIALIZABLE</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Inidicates a transaction isolation level of SERIALIZABLE. This value is used 
     to set the TransactionIsolation level in the $connectionOptions arrary passed 
     to <span class="function"><a href="function.sqlsrv-connect.html" class="function">sqlsrv_connect()</a></span>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-cursor-forward">
     <strong><code>SQLSRV_CURSOR_FORWARD</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Inidicates a forward-only cursor. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/ee376927.aspx" class="link external">&raquo;&nbsp;Specifying a Cursor Type and Selecting Rows</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-cursor-static">
     <strong><code>SQLSRV_CURSOR_STATIC</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Inidicates a static cursor. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/ee376927.aspx" class="link external">&raquo;&nbsp;Specifying a Cursor Type and Selecting Rows</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-dynamic">
     <strong><code>SQLSRV_CURSOR_DYNAMIC</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Inidicates a dynamic cursor. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/ee376927.aspx" class="link external">&raquo;&nbsp;Specifying a Cursor Type and Selecting Rows</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-cursor-keyset">
     <strong><code>SQLSRV_CURSOR_KEYSET</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Inidicates a keyset cursor. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/ee376927.aspx" class="link external">&raquo;&nbsp;Specifying a Cursor Type and Selecting Rows</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-cursor-buffered">
     <strong><code>SQLSRV_CURSOR_BUFFERED</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Creates a client-side cursor query. Lets you access rows in any order. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/ee376927.aspx" class="link external">&raquo;&nbsp;Specifying a Cursor Type and Selecting Rows</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-scroll-next">
     <strong><code>SQLSRV_SCROLL_NEXT</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Specifies which row to select in a result set. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/ee376927.aspx" class="link external">&raquo;&nbsp;Specifying a Cursor Type and Selecting Rows</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-scroll-prior">
     <strong><code>SQLSRV_SCROLL_PRIOR</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Specifies which row to select in a result set. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/ee376927.aspx" class="link external">&raquo;&nbsp;Specifying a Cursor Type and Selecting Rows</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-scroll-first">
     <strong><code>SQLSRV_SCROLL_FIRST</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Specifies which row to select in a result set. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/ee376927.aspx" class="link external">&raquo;&nbsp;Specifying a Cursor Type and Selecting Rows</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-scroll-last">
     <strong><code>SQLSRV_SCROLL_LAST</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Specifies which row to select in a result set. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/ee376927.aspx" class="link external">&raquo;&nbsp;Specifying a Cursor Type and Selecting Rows</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-scroll-absolute">
     <strong><code>SQLSRV_SCROLL_ABSOLUTE</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Specifies which row to select in a result set. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/ee376927.aspx" class="link external">&raquo;&nbsp;Specifying a Cursor Type and Selecting Rows</a>.
     </span>
    </dd>

   
   
    <dt id="constant.sqlsrv-scroll-relative">
     <strong><code>SQLSRV_SCROLL_RELATIVE</code></strong> 
     (<span class="type"><a href="language.types.integer.html" class="type integer">integer</a></span>)
    </dt>

    <dd>

     <span class="simpara">
     Specifies which row to select in a result set. For usage information, see 
     <a href="http://msdn.microsoft.com/en-us/library/ee376927.aspx" class="link external">&raquo;&nbsp;Specifying a Cursor Type and Selecting Rows</a>.
     </span>
    </dd>

   
  </dl>

 </p>
</div>
<hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="sqlsrv.resources.html">资源类型</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="ref.sqlsrv.html">SQLSRV 函数</a></div>
 <div class="up"><a href="book.sqlsrv.html">SQLSRV</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>
